<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
	<meta charset="utf-8" />
	<meta name="keywords" content="pinpin社保" />
	<meta name="description" content="pinpin社保" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="renderer" content="webkit" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>社保运营后台-天机查询</title>
	<%@ include file="/WEB-INF/jsp/common/common.jsp" %>
</head>
<body>
	<div id="wrapper">
        <%@ include file="/WEB-INF/jsp/common/menu.jsp" %>
        <div id="page-wrapper">
        	<div class="row">
                <div class="col-lg-12">
                    <!-- 路径导航 -->
                    <ol class="breadcrumb">
				      <li>社保后台</li>
				      <li class="active">天机查询</li>
				    </ol>
                </div>
            </div>
            <div class="row">
            	<div class="col-lg-12">
            		<div class="panel panel-default">
            			<div class="panel-body">
        			    	<div class="form-inline dt-bootstrap no-footer">
        			    		<!-- 表单查询 -->
        			    		<form action="${list_uri }" method="get" id="tianjiForm" class="form-check">
        			    		<div class="row">
        			    			<div class="col-lg-12">
                                        <input type="text" class="form-control" name="phone" value="${tianjiParam.phone }" placeholder="输入用户手机号">
        			    			    <button type="button" id="queryBtn" class="btn btn-primary">查 询</button>
        			    			    <button type="button" id="resetBtn" class="btn btn-primary">重置</button>
        			    			</div>
        			    		</div>
        			    		</form>
        			    		<!-- 分页 -->
        			    		<jsp:include page="/WEB-INF/jsp/common/page.jsp">
        			    			<jsp:param name="formId" value="tianjiForm"/>
        			    		</jsp:include>
        			    		<!-- 表格列表 -->
        			    		<div class="row">
        			    			<div class="col-lg-12 width-auto">
        			    				<table id="dataContent" class="table table-striped table-bordered table-hover no-footer" role="grid">
        			    					<thead>
        			    						<tr>
        			    							<th>城市</th>
                                                    <th>手机号</th>
                                                    <th>身份证</th>
                                                    <th>社保缴纳额</th>
                                                    <th>社保总时长</th>
                                                    <th>社保查询时间</th>
                                                    <th>公积金缴纳基数</th>
                                                    <th>公积金缴纳金额</th>
                                                    <th>公积金总时长</th>
                                                    <th>公积金查询时间</th>
                                                </tr>
        			    					</thead>
        			    					<tbody>
        			    					<c:forEach items="${pageModel.recordList }" var="tianji">
        			    						<tr role="row">
        			    							<td>${tianji.city }</td>
        			    							<td>${tianji.phone }</td>
        			    							<td>${tianji.idcard }</td>
        			    							<c:if test="${empty tianji.insureQueryTime }">
        			    								<td></td>
        			    								<td></td>
        			    								<td></td>
        			    							</c:if>
        			    							<c:if test="${not empty tianji.insureQueryTime }">
	        			    							<td>
	        			    								<fmt:formatNumber type="number" value="${(tianji.insurePer+tianji.insureCom)/100 }" pattern="0.00" maxFractionDigits="2"/>
	        			    								<br>
	        			    								单位: <fmt:formatNumber type="number" value="${tianji.insureCom/100 }" pattern="0.00" maxFractionDigits="2"/>
	        			    								个人: <fmt:formatNumber type="number" value="${tianji.insurePer/100 }" pattern="0.00" maxFractionDigits="2"/>
	        			    							</td>
	        			    							<td>
	        			    								${tianji.insureBeginMonth }-${tianji.insureEndMonth }
	        			    								<br>
	        			    								养老断缴: <c:if test="${empty tianji.insurePensionLackMonth }">无断缴</c:if><c:if test="${not empty tianji.insurePensionLackMonth }">${tianji.insurePensionLackMonth }</c:if>
	        			    								医疗断缴: <c:if test="${empty tianji.insureMedicalLackMonth }">无断缴</c:if><c:if test="${not empty tianji.insureMedicalLackMonth }">${tianji.insureMedicalLackMonth }</c:if>
	        			    							</td>
	        			    							<td><fmt:formatDate value="${tianji.insureQueryTime }" pattern="yyyy-MM-dd HH:mm:ss" /></td>
        			    							</c:if>
        			    							<c:if test="${empty tianji.fundQueryTime }">
        			    								<td></td>
        			    								<td></td>
        			    								<td></td>
        			    								<td></td>
        			    							</c:if>
        			    							<c:if test="${not empty tianji.fundQueryTime }">
	        			    							<td><fmt:formatNumber type="number" value="${tianji.fundBaseMoney/100 }" pattern="0.00" maxFractionDigits="2"/></td>
	        			    							<td>
	        			    								<fmt:formatNumber type="number" value="${tianji.fundMonthMoney/100 }" pattern="0.00" maxFractionDigits="2"/>
	        			    								<br>
	        			    								单位: <fmt:formatNumber type="number" value="${tianji.fundCom/100 }" pattern="0.00" maxFractionDigits="2"/>  
	        			    								个人: <fmt:formatNumber type="number" value="${tianji.fundPer/100 }" pattern="0.00" maxFractionDigits="2"/>
	        			    							</td>
	        			    							<td>
	        			    								${tianji.fundBeginMonth }-${tianji.fundEndMonth }
	        			    								<br>
	        			    								断缴: <c:if test="${empty tianji.fundLackMonth }">无断缴</c:if><c:if test="${not empty tianji.fundLackMonth }">${tianji.fundLackMonth }</c:if>
	        			    							</td>
	        			    							<td><fmt:formatDate value="${tianji.fundQueryTime }" pattern="yyyy-MM-dd HH:mm:ss" /></td>
        			    							</c:if>
        			    							
        			    						</tr>
        			    					</c:forEach>
        			    					</tbody>
        			    				</table>
        			    			</div>
        			    		</div>
        			    		<!-- 分页 -->
                                <hr/>
        			    		<jsp:include page="/WEB-INF/jsp/common/page.jsp">
        			    			<jsp:param name="formId" value="tianjiForm"/>
        			    		</jsp:include>
        			    	</div>
            			</div>
            		</div>
            	</div>
            </div>
        </div>
	</div>
    <script language="javascript">
    	$(function(){
    		$("#queryBtn").click(function(){
        		var $form = $("#tianjiForm");
        		$form.submit();
            });
    		$("#resetBtn").click(function(){
    			$("#tianjiForm").find("input[type='text'],input[type='select']").val("");
    		});
    	});
    </script>
</body>
</html>